package net.crowdloud.server.DatabaseAccess.solution;

import javax.jdo.PersistenceManager;

public class GetSolution {

	public static net.crowdloud.shared.entities.Solution get(
			PersistenceManager persistenceManager, Long solutionID) {

		Solution solutionDatabase = getSolutionDatabase(persistenceManager,
				solutionID);

		net.crowdloud.shared.entities.Solution solution = ConvertDatabaseToSolution
				.getSolution(solutionDatabase);

		return solution;
	}

	public static Solution getSolutionDatabase(
			PersistenceManager persistenceManager, Long solutionID) {

		Solution solutionDatabase = persistenceManager.getObjectById(
				Solution.class, solutionID);

		return solutionDatabase;
	}

}
